Repository navigation
Add localized resource strings for TerminalTestReporter summary output - #6602
Conversation
… in TerminalTestReporter Co-authored-by: nohwnd <5735905+nohwnd@users.noreply.github.com>
Co-authored-by: nohwnd <5735905+nohwnd@users.noreply.github.com>
|
don't double the resources, there is already SkippedLowercase, FailedLowercase, add similar resources for total and others that don't exist. |
|
nohwnd commented 2 days ago add similar resources for total and others that don't exist. |
…and Duration Co-authored-by: nohwnd <5735905+nohwnd@users.noreply.github.com>
Fixed in 5cf9c81. I've removed the duplicate resources and now reuse the existing |
|
Copilot fix the description based on the latest code DurationLowercase is now there instead of Duration. |
You're correct. After the latest changes, the PR description should be updated to reflect that |
This PR implements localization support for the TerminalTestReporter's test summary output, similar to the changes made in dotnet/sdk PR #50975.
Problem
The TerminalTestReporter was using hardcoded English strings for test summary output:
This prevented proper internationalization of the test summary display for users in different locales.
Solution
Replaced hardcoded strings with localized resource references from
PlatformResources:Changes Made
Added 2 new resource strings to
PlatformResources.resx:TotalLowercase= "total"DurationLowercase= "duration"Reused existing resource strings:
FailedLowercase= "failed" (already existed)PassedLowercase= "passed" (already existed)SkippedLowercase= "skipped" (already existed)Updated all 13
.xlflocalization files with corresponding entries for the 2 new resources onlyModified
TerminalTestReporter.csto use the existing and new resource strings (6 lines changed)Benefits
*LowercaseresourcesExample Output
When running tests with different UI language settings, users will see localized summary text:
total: 5,failed: 2,succeeded: 3This change brings the TerminalTestReporter in line with other .NET testing tools that support localization.
Fixes #6599.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.